home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / internet / ncftp2b6.zip / NCFTP.DOC < prev    next >
Text File  |  1996-01-22  |  65KB  |  1,516 lines

  1. INTRODUCTION
  2.  
  3.      NcFTP is a user interface to the Internet standard File Transfer
  4.      Protocol. This program allows a user to transfer files to and from a
  5.      remote network site, and offers additional features that are not found
  6.      in the standard interface, ftp.
  7.  
  8.      The program runs in one of three modes: visual mode, line mode and
  9.      colon mode.
  10.  
  11.      If your system is somewhat modern, the default mode should be visual
  12.      mode. This is a full-screen interface that uses the curses library.
  13.  
  14.      With visual mode, you edit the program's settings with a nice screen
  15.      interface instead of typing arcane commands.
  16.  
  17.      If you are not in visual mode, you will be using line mode for the
  18.      interactive shell. This mode is a no-frills command-line interface
  19.      that will look like the default ftp program's command shell.
  20.  
  21.      The third mode, colon mode, refers to the program's ability to do a
  22.      quick retrieve of a file directly from your shell command line,
  23.      without going into the program's own shell. This mode is useful for
  24.      shell scripts.
  25.  
  26.      NcFTP v2.3.0 provides several enhancements over the standard ftp
  27.      available with IBM's TCP/IP and Warp's IAK.  NcFTP offers serveral
  28.      benefits and enhancements, such as:
  29.  
  30.           o    A progress indicator bar
  31.  
  32.           o    Re-get support - The abilitity to automatically restart an
  33.                aborted ftp transfer at the point where it left off.
  34.  
  35.           o    Colon-mode, which allows you to quickly pick up a single
  36.                file by typing a single command on the command line.
  37.  
  38.           o    Recursive gets; Now you can retrieve entire sub-directory
  39.                trees using the -r switch with the get command.
  40.  
  41.           o    Get `newer than X-files';  This retrieves files that are
  42.                newer than X days.
  43.  
  44.           o    Get new files only;  NcFTP now has the ability to skip files
  45.                that you already have, making it easy to mirror other sites,
  46.                or just pick up new files since your last ftp session.
  47.  
  48.           o    Integrated hosts editor.
  49.  
  50. WHAT DIFFERENT WITH THIS PORT
  51.  
  52.      All features of the original UNIX version of NcFTP have been
  53.      maintained, with two exceptions:
  54.  
  55.           o    SOCKS support has not been implemented (yet!).
  56.           o    NcFTP does not go into `silent mode' when in the background.
  57.  
  58.      All other features have been maintained.  Also, there are some new
  59.      features or enhancements with this port.  Specifically they are:
  60.  
  61.           o    FAT partition friendly, NcFTP will work equally as well on
  62.                FAT partititions as it will on HPFS partititions.
  63.  
  64.           o    NcFTP will interpret / as \ for local system file names.
  65.  
  66.           o    Background Paging.  This feature was introduced by Steve
  67.                Willer in the v1.9.3 port of NcFTP.  This features gives you
  68.                the ability to have your pager program start in a separate
  69.                window.  The window title bar will refect exactly what is
  70.                being viewed.  The specific commands are:
  71.  
  72.                          bpage
  73.                          bls
  74.                          bdir
  75.                          bredir
  76.  
  77.           o    Complete control over the NcFTP's colors.  There is now a
  78.                Color Configuration screen which allows you to set your
  79.                favorite colors.
  80.  
  81.           o    Three new Global Preference Options are now available:
  82.  
  83.                     Maximum Redials - Sets the maximum number of retries
  84.                                       to connect to a busy system.
  85.                     Redial Delay    - Sets the delay between redials.
  86.                     Pager in new window - All NcFTP `pager' related
  87.                                           commands run in a separate window.
  88.  
  89.           o    NcFTP for OS/2 no longer uses the `i.am.running' flag file
  90.                to determine if other copies of NcFTP are running.  It now
  91.                uses OS/2 semaphores.  This is a key feature incase NcFTP
  92.                were to crash, it will not leave old files laying around.
  93.  
  94.           o    NcFTP now clears the screen before calling a command shell.
  95.  
  96.           o    The `ESCAPE' key will clear the input line, just like OS/2.
  97.  
  98.           o    When writing files to a FAT partition, NcFTP will set the
  99.                extended attribute .LONGNAME to the actual file name.
  100.  
  101.  
  102. INSTALLATION
  103.  
  104.      Place NcFTP.exe in your path.
  105.  
  106.      Be sure you have the latest version of emx's run-time libraries. NcFTP
  107.      requres emx09b fix01 or later to run properly.  If you have an older
  108.      version of emx runtimes, you can get the latest from:
  109.  
  110.           ftp://hobbes.nmsu.edu/os2/unix/emx09b/emxrt.zip
  111.      NcFTP also requires the GNU File Utilities v3.12 or above,
  112.      specifically it needs the ls.exe program for certain commands to work.
  113.      If you do not have these utilities or need the latest version, you can
  114.      get the lastest from:
  115.  
  116.           ftp://hobbes.nmsu.edu/os2/unix/gnufutil.zip
  117.  
  118.      NcFTP also requires an external 'pager' program that views text files
  119.      from the remote host.  By default, NcFTP uses the OS/2 more command,
  120.      which is not very robust.  I recommend you use less.exe.  Less.exe has
  121.      been ported from Unix and provides several enhancements over the more
  122.      command.  If you don't have less.exe or need a later version, you get
  123.      the it from:
  124.  
  125.           ftp://hobbes.nmsu.edu/os2/unix/less2912.zip
  126.  
  127.      The following environment variables are required for NcFTP to run
  128.      properly:
  129.  
  130.           HOME      this points to your home directory.  NcFTP will create
  131.                     a subdirectory under this directory called .ncftp (or
  132.                     _ncftp for FAT  partitions).  This is where NcFTP will
  133.                     store its configuration files.
  134.  
  135.           HOSTNAME  If NcFTP is unable to resolve your hostname, set this
  136.                     environment variable. i.e.;
  137.  
  138.                     SET HOSTNAME=myhostname
  139.  
  140.           DOMAIN    If NcFTP is unable to resolve your domain name, set
  141.                     this environment variable to your domain name:
  142.  
  143.                     SET DOMAIN=inetport.com
  144.  
  145.      The first time you run NcFTP, issues the `prefs' command and setup
  146.      your preferences.  For more information on preference, see the
  147.      PREFERENCES section.
  148.  
  149.  
  150. RUNNING NcFTP
  151.  
  152.      ncftp [program options] [[open options] hostname[:pathname]]
  153.  
  154.      OPTIONS:
  155.  
  156.           Program options:
  157.                -D   : Turn debug mode and trace mode on.
  158.                -L   : Don't use visual mode (use line mode).
  159.                -V   : Use visual mode.
  160.                -H   : Dump the version information.
  161.  
  162.           Command-line open options:
  163.                -a   : Open anonymously.
  164.                -u   : Open with username and password prompt.
  165.                -p X : Use port number X when opening.               -r   : Redial until connected.
  166.                -d X : Redial, delaying X seconds between tries.
  167.                -g X : Give up after X redials without connection.
  168.  
  169.           Command-line retrieve options:
  170.                -C   : Force continuation (reget).
  171.                -f   : Force overwrite.
  172.                -G   : Don't use wildcard matching.
  173.                -R   : Recursive. Useful for fetching whole directories.
  174.                -n X : Get selected files only if X days old or newer.
  175.  
  176. INTRODUCTION TO VISUAL MODE
  177.  
  178.      When entering visual mode, the screen clears and is rewritten with the
  179.      splash screen. You should see the black status bar occupying the
  180.      second to last row on the screen. Beneath the status bar is the input
  181.      line, where you type commands to the program's shell.
  182.  
  183.      The program then waits for you to do something. Usually this means you
  184.      want to open a remote filesystem to transfer files to and from your
  185.      local machine's filesystem. To do that, you need to know the symbolic
  186.      name of the remote system, or its Internet Protocol (IP) address. For
  187.      example, a symbolic name might be ``typhoon.unl.edu,'' and its IP
  188.      address could be _129.93.33.24._ To open a connection to that system,
  189.      you use the program's open command:
  190.  
  191.           open typhoon.unl.edu
  192.           open 129.93.33.24
  193.  
  194.      Both of these try to open the machine called typhoon at the University
  195.      of Nebraska. Using the symbolic name is the preferred way, because IP
  196.      addresses may change without notice, while the symbolic names usually
  197.      stay the same.
  198.  
  199.      When you open a remote filesystem, you need to have permission. The
  200.      FTP Protocol's authentication system is very similar to that of
  201.      logging in to your account. You have to give an account name, and its
  202.      password for access to that account's files. However, most remote
  203.      systems that have anything you might be interested in don't require an
  204.      account name for use. You can often get anonymous access to a remote
  205.      filesystem and exchange files that have been made publicly accessible.
  206.      The program attempts to get anonymous permission to a remote system by
  207.      default. What actually happens is that the program tries to use
  208.      ``anonymous'' as the account name, and when prompted for a password,
  209.      uses your E-mail address as a courtesy to the remote system's
  210.      maintainer. You can have the program try to use a specific account
  211.      also. That will be explained later.
  212.  
  213.      If the connection succeeded, you should see the status bar change to
  214.      hold the remote system's name on one side, and the current remote
  215.      directory on the other side. To see what's in the current remote
  216.      directory, you can use the program's ls and dir commands. The former
  217.      is terse, preferring more remote files in less screen space, and the
  218.      latter is more verbose, giving detailed information about each item in
  219.      the directory.
  220.      You can use the program's cd command to move to other directories on
  221.      the remote system. The cd command behaves very much like the command
  222.      of the same name in the Bourne and Korn shell.
  223.  
  224.      The purpose of the program is to exchange data with other systems. You
  225.      can use the program's get command to copy a file from the remote
  226.      system to your local system:
  227.  
  228.           get README.txt
  229.  
  230.      The program will display the progress of the transfer on the screen,
  231.      so you can tell how much needs to be done before the transfer
  232.      finishes. When the transfer does finish, then you can enter more
  233.      commands to the program's command shell.
  234.  
  235.      You can use the program's put command to copy a file from your system
  236.      to the remote system:
  237.  
  238.           put something.tar
  239.  
  240.      When you are finished using the remote system, you can open another
  241.      one or use the quit command to terminate the program.
  242.  
  243. THE BOOKMARKS FILE
  244.  
  245.      One of the program's goals is to minimize typing and maximize
  246.      convenience. The program automatically saves information about the
  247.      sites you call on in a special file called the bookmarks file, which
  248.      is stored in the .ncftp subdirectory of your home directory. Each
  249.      bookmark saves the host name along with other settings, including the
  250.      remote directory you were in, the account information, and more. This
  251.      makes it easy to call back a site later and have everything be like it
  252.      was when you left the last time.
  253.  
  254.      A big advantage of saving this information is that you can refer to a
  255.      site by a shorter, more meaningful name, instead of using the full
  256.      symbolic host name for a site. For example, if you called a site named
  257.      ``typhoon.unl.edu'' frequently, its bookmark name might be just
  258.      ``typhoon.'' Then, instead of:
  259.  
  260.           open typhoon.unl.edu
  261.  
  262.      you could use:
  263.  
  264.           open typhoon
  265.  
  266.      You could also abbreviate the bookmark name further, as long as the
  267.      program will know which site you are referring to. If no other
  268.      bookmark's name starts with the letters ``ty,'' you could do just:
  269.  
  270.           open ty
  271.  
  272.      Use the bookmarking feature to assign mnemonic names to hosts whose
  273.      real names don't give much hint to what you call there for. A popular
  274.      game called Nethack is archived at linc.cis.upenn.edu, in the     /pub/NH3.1 directory. You could assign ``nethack'' as the bookmark
  275.      name for this site. Then you could try:
  276.  
  277.           open nethack
  278.  
  279.      instead of:
  280.  
  281.           open linc.cis.upenn.edu
  282.  
  283. USING THE BOOKMARK EDITOR
  284.  
  285.      To manipulate the bookmarks stored in your bookmarks file, you use the
  286.      program's bookmark editor. Run the bookmark editor by typing the
  287.      bookmarks command from within the program. This brings up a new screen
  288.      of information. On the right side is the list of remote systems the
  289.      program has saved for you already. Each time you open a connection to
  290.      a remote system, the program saves an entry in your bookmark file for
  291.      you automatically. If you have not opened any sites successfully yet,
  292.      this list would be empty.
  293.  
  294.      On the left side is some instructions saying what you can do with the
  295.      list. The bookmark editor is waiting for you to do something, like
  296.      select a bookmark whose settings you want to edit.
  297.  
  298.      Some bookmark editor ``hot key'' commands are one key only. You do not
  299.      need to hit enter after the hot key commands. To exit the bookmark
  300.      editor for example, you would just type the ``x'' key only. The
  301.      multikey commands require a slash first and do require the enter key.
  302.      To delete the selected site, for example, you would type the ``/''
  303.      key, then ``del,'' and then the enter key.
  304.  
  305.      You can use the ``d'' key to move down one line in the list, and the
  306.      ``u'' key to move up one line. If you have many entries in the
  307.      bookmark list, you won't be able to see them all at once. The bookmark
  308.      list scrolls as appropriate to bring the other sites into view. Use
  309.      the ``p'' and ``n'' keys to move pages at a time.
  310.  
  311.      Another way to select a site in the bookmark list is to use the
  312.      capital letters. If I had many entries in my bookmark list, but wanted
  313.      to select a site whose bookmark name was ``nethack,'' I could type
  314.      ``N'' and the list would zoom to the first site with bookmark starting
  315.      with the letter ``n.''
  316.  
  317.      After you have hilited a bookmark you want to edit, use the /ed
  318.      command. Doing that brings up another screen with the settings for
  319.      that bookmark.
  320.  
  321.      In the Bookmark Options screen, you use hot keys to select a setting
  322.      to edit. To edit the bookmark name, for example, you would type ``a.''
  323.      When you are finished editing this bookmark, hit the ``x'' key to
  324.      return to the bookmark editor's screen.
  325.  
  326. BOOKMARK OPTIONS
  327.  
  328.      Edit the Bookmark name field to change the name you use to open this
  329.      site with. Remember, when you change the bookmark name , you must use     this name to refer to this particular bookmark, so if you change it to
  330.      ``foobar,'' you need to use ``open foobar.'' This is required because
  331.      you can have multiple entries for a remote host. For example, you
  332.      could have two bookmarks for wuarchive.wustl.edu, named ``wumac'' and
  333.      ``wuwindows.'' If you were to say ``open wuarchive.wustl.edu,'' it
  334.      would not be clear to the program which host entry to use.
  335.  
  336.      Change the login information for the site by editing the User,
  337.      Password, and Account fields. Normally you would want to leave these
  338.      as is for anonymous logins. Depending on your situation, you might
  339.      want to use a specific account on the remote system. This is one way
  340.      to get the program to use a non anonymous login.
  341.  
  342.      The Directory field specifies the directory to move to upon successful
  343.      connection to the remote host for this bookmark. When you close the
  344.      site, this field is updated for you automatically to be the directory
  345.      you were in when you closed the site.
  346.  
  347.      The Transfer Type field can be changed to use a different translation
  348.      mode when transferring files. This program is usually running on a
  349.      UNIX system, and most remote systems are also UNIX variants, so the
  350.      default transfer type is binary, which does no translation at all.
  351.  
  352.      However, when you need to work with plain text files and transfer them
  353.      between non-UNIX systems, you can change this to ASCII. That will
  354.      guarantee that the text-only files will translate correctly. Most
  355.      often, you will need to use the binary transfer type.
  356.  
  357.      The Port field can be changed so that the program tries to use a non-
  358.      standard port number. I have yet to ever need a different port number,
  359.      but this capability is here in case it's needed.
  360.  
  361.      The Has SIZE Command field will probably not need to be edited. This
  362.      field is mostly for your information only. The SIZE command is an FTP
  363.      Protocol command that the program would like the remote server to
  364.      support. If it is supported, the program can get an exact number of
  365.      bytes of remote files before transferring. That is nice to know so the
  366.      progress reports work better.
  367.  
  368.      The Has MDTM Command field will probably not need to be edited either.
  369.      If the remote server supports it, the program can get the exact
  370.      modification date of the remote file, and set the local file to the
  371.      same date.
  372.  
  373.      The Can Use Passive FTP field specifies whether the remote server
  374.      allows use of the FTP Protocol's PASV command. There are two ways to
  375.      set up FTP connections. The default way is what I call Port FTP.
  376.      Unfortunately, Port FTP cannot be used when your local host is hiding
  377.      behind a Firewall. Passive FTP can be used with a firewall, and that's
  378.      why I would like to use that method if possible. You probably will not
  379.      need to edit this field, since this can be detected automatically most
  380.      of the time.
  381.  
  382.      The Operating System field is used by the program to tell if it can
  383.      rely on certain dependencies to specific operating systems. If the OS
  384.      is a UNIX variant, the program can make some assumptions about the     remote server's responses. For example, if the OS is UNIX, the ls
  385.      command tries to use the -CF flags, like you could with ``/bin/ls -
  386.      CF'' on UNIX. If the OS wasn't UNIX, the ``-CF'' might not make sense
  387.      to the remote server and it might complain. You probably will not need
  388.      to edit this field, since this can be detected automatically most of
  389.      the time.
  390.  
  391.      The comment field can be used to store a brief description about the
  392.      site. For example, for my ``nethack'' entry, I could use this field to
  393.      hold ``Archive site for latest version of Nethack.'' When you are in
  394.      the bookmark editor's window, if you hilite a site that has a comment,
  395.      it is printed at the bottom of the screen so you do not have to edit
  396.      the site to look at it.
  397.  
  398. PREFERENCES
  399.  
  400.      In addition to remote-host specific options, the program has global
  401.      options that are user-configurable. To change the program's
  402.      preferences, run the prefs command from within the program.
  403.  
  404.      The Default open mode field specifies how the program should try to
  405.      open connections. If you do a lot of anonymous FTPing, you should
  406.      leave this set to anonymous. You might want to set this field to user
  407.      & password if the hosts you FTP to most often don't allow anonymous
  408.      logins. For example, if you are using the program on your company
  409.      network to copy things from different company machines, you would not
  410.      want to use anonymous FTP mode.
  411.  
  412.      The Anonymous password field lets you change the value given to the
  413.      remote host when you use an anonymous login. It is customary (and
  414.      sometimes required) to use your e-mail address as the password for
  415.      anonymous FTP, so the remote host's administrator knows who is using
  416.      the service. If the program didn't get your e-mail address right, or
  417.      you want to use something different, you can change it here.
  418.  
  419.      The program now uses more whitespace than before to reduce eyestrain.
  420.      If you prefer, you can turn off that feature by changing the Blank
  421.      lines between cmds field.
  422.  
  423.      The program can log the transfers you do to a file so you can refer to
  424.      the log if you can't remember where you got something. To turn on the
  425.      log, which is saved as ~/.ncftp/log, you can set the User log size
  426.      field to a number greater than zero. You probably do not want to let
  427.      this file grow forever, so you set the maximum size of the log by
  428.      setting that field.
  429.  
  430.      Although the program is perfectly happy saving every site you ever
  431.      open in the bookmarks file, you may want to put an upper bound on the
  432.      number of sites saved. If you have a slow machine, which might cause
  433.      the program to take awhile to load and save the bookmarks, or if disk
  434.      space is at a premium, you can set the Max bookmarks to save field to
  435.      limit the number of bookmarks saved. Once that limit is reached, the
  436.      program will discard sites whose time since the last connection is the
  437.      longest. In other words, a site you only called once a long time ago
  438.      and forgot about will be the first to go.
  439.      A few program functions need to use a pager program to view large
  440.      amounts of text. For example, the page command retrieves a remote file
  441.      and uses the pager to view it. You can specify the program to use (and
  442.      its command line flags, if any) by setting the pager field.
  443.  
  444.      When you transfer files between the remote host and your local host,
  445.      the program uses a progress meter to show you the status of the
  446.      transfer. The program has a few different progress meters to choose
  447.      from, and you can try out the other ones by changing the Progress
  448.      meter field.
  449.  
  450.      You can control how much of the remote server's chatter is printed by
  451.      changing the Remote messages field. The program always prints error
  452.      messages, but most of the time the remote server doesn't have anything
  453.      useful to say. There are a couple of messages that may be worth
  454.      printing. The first is the startup message. Typically, when you
  455.      connect to a server it has some important information about the
  456.      server. Some servers have chdir messages, which are sent when you
  457.      enter a special directory. You specify whether to print these messages
  458.      by toggling the Remote messages field.
  459.  
  460.      By default, the program stays in the same directory you were in when
  461.      you ran the program, so that downloads will go in that directory. I
  462.      like to use a ``download directory'' so that all of my downloads go to
  463.      a specific directory. This prevents me from exceeding my quota, and
  464.      overwriting my other files. You can set the Startup in Local Dir field
  465.      to have the program change the local directory each time when the
  466.      program starts up. Then you know where to expect your downloads to end
  467.      up.
  468.  
  469.      The program itself has some messages which you may get tired of and
  470.      want to turn off. You can change the Startup messages field to specify
  471.      whether the program prints its ``splash screen'' and whether it prints
  472.      a tip on how to maximize use of the program.
  473.  
  474.      When you retrieve a remote file, by default the program tries to also
  475.      set the exact modification time of the local file as the remote file.
  476.      You can turn that off by changing the File timestamps field.
  477.  
  478.      If you don't like the full-screen graphics, you can use the line-
  479.      oriented mode by changing the Screen graphics field. Once you turn
  480.      visual mode off from the Preferences screen, you won't be able to get
  481.      back to the preferences screen again when using line mode. To get back
  482.      into visual mode, you can run the program with the ``-V'' flag, like:
  483.  
  484.           ncftp -V
  485.  
  486.      By default, NcFTP will only try once to open a remote site.  You can
  487.      set Redial Attempts to a number greater than one, and NcFTP will
  488.      automatically redial the remote site if the connection failed.
  489.  
  490.      When redialing a remote system, NcFTP will sleep X number of seconds.
  491.      You can specify the amount of time to sleep between redial attempts.
  492.  
  493.      NcFTP has the ability to start your pager program in a separate window
  494.      by using the bredir, bpage and bls commands.  If you would like ALL     pager related commands to start in a separate window, set Pager In
  495.      Separate Window to yes.
  496.  
  497. COLORS
  498.  
  499.      In addition to remote-host specific options and global options that
  500.      are user-configurable, NcFTP allows you to change the program's
  501.      appearence by editing the programs colors.  Run the colors command
  502.      from within the program.
  503.  
  504.      The NcFTP Screen is broken down into 4 areas, List, Prompt, Input and
  505.      Status.  Below is a screen snapshot showing each area:
  506.  
  507.             +------------------------------------------------+
  508.             |                                                |
  509.             |                                                |
  510.             |                 List Area                      |
  511.             |                                                |
  512.             |                                                |
  513.             +------------------------------------------------+
  514.             |                 Status Bar                     |
  515.             +------------------------------------------------+
  516.             | Prompt>   Input Area                           |
  517.             +------------------------------------------------+
  518.  
  519. COMMAND REFERENCE
  520.  
  521.   ?       Help
  522.  
  523.      from the command shell, the program prints the names of all of the
  524.      supported commands. From there, you can get specific help for a
  525.      command by typing the command after, for example:
  526.  
  527.           ? open
  528.  
  529.      prints information about the open command.
  530.  
  531.  
  532.   !       Shell Command
  533.  
  534.      To spawn a shell, just do:
  535.  
  536.           !
  537.  
  538.      You can also pass commands to the shell by placing the command to
  539.      execute immediately following the !, for example:
  540.  
  541.           !dir/w
  542.  
  543.      will display a directory listing and then prompt the user to [Hit
  544.      Return] to continue.
  545.  
  546.      If a command is passed to the OS shell, NcFTP will prompt the user to
  547.      [Hit Return] when the command completes.  If the program is shelled to
  548.      OS/2, by using only a !, NcFTP will not prompt the user to [Hit
  549.      Return] upon exiting the shell.
  550.  
  551.   ascii   Set File Transfer Mode to ASCII
  552.  
  553.      Sets the file transfer type to ASCII text.  In this mode, UNIX
  554.      linefeeds will be translated to Carriage Return / Linefeed pairs.  The
  555.      ascii command requires no parameters.
  556.  
  557.   bdir    Background Directory
  558.  
  559.      The bdir command prints a detailed directory listing to your pager in
  560.      a separte window.
  561.  
  562.      It tries to behave like UNIX's ``/bin/ls -l'' command. If the remote
  563.      server seems to be a UNIX host, you can also use the same flags you
  564.      would with ls, for instance
  565.  
  566.           bdir -rt
  567.  
  568.      would try to act like
  569.  
  570.           /bin/ls -lrt
  571.  
  572.      would on UNIX.
  573.      Special Note: On large directory listings, you may have to scroll to
  574.      the end of the directory listing before NcFTP regains control.
  575.  
  576.  
  577.   binary  Sets File Transfer Mode to Binary
  578.  
  579.      Sets the file transfer type to Binary.  In this mode, no translations
  580.      are performed between the local host and the remote host.
  581.  
  582.   bls          Background Directory List
  583.  
  584.      The bls command is equivalent to ls, only it feeds it's output to your
  585.      pager in a separate window. This command  is primarily for line mode
  586.      because directory listings can scroll offscreen. If you do a normal ls
  587.      while in visual mode, if it would go offscreen, the built-in pager
  588.      kicks in automatically.
  589.  
  590.   bookmark     Create/Update Bookmark using current host
  591.  
  592.      The bookmark command will create or update a bookmark using the
  593.      current host and directory.  If you had logged into ftp.leo.org and
  594.      were in the /pub/os2/incoming directory, you can use the bookmark
  595.      command to save this information in the bookmarks file.
  596.  
  597.           bookmark leo
  598.  
  599.      This would save ftp.leo.org in the bookmarks file with an alias of
  600.      leo.
  601.  
  602.   bookmarks    Enter the Bookmark Editor
  603.  
  604.      The bookmarks  command will take you into the Bookmark Editor Screen.
  605.      See the Bookmarks Section for more information.
  606.  
  607.   bpage   View remote files in a separate window
  608.  
  609.      The bpage command lets you browse a remote file one page at a time in
  610.      a separate window. This is useful for reading README's on the remote
  611.      host without downloading them first. This command uses whatever
  612.      program you have set the pager field in the Preferences screen to view
  613.      the file.
  614.  
  615.      bpage can take multiple file names as parameters, meaning you can
  616.      specify one or several files to view, for example:
  617.  
  618.           bpage  00index.txt newfiles
  619.  
  620.      would display both files, 00index.txt and newfiles using your pager in
  621.      a separate window.
  622.  
  623.   bredir  Re-displays the last directory listing through your pager in a
  624.   separate window
  625.  
  626.      The bredir command give you a way to re-display the last directory
  627.      listing. The program saves the output from the last dir or ls command
  628.      you did, so if you want to see it again you can do this without     wasting network bandwidth.   The bredir command feeds the output to
  629.      your pager in a separate window.
  630.  
  631.   bye     Exits NcFTP
  632.  
  633.      The bye command closes all connections and exits NcFTP.
  634.  
  635.  
  636.  
  637.   cat          Views a file from the remote host
  638.  
  639.      The cat command lets you browse a remote file one page at a time. This
  640.      is useful for reading README's on the remote host without downloading
  641.      them first. This command uses the internal NcFTP viewer.
  642.  
  643.   cd           Changes remote working directory
  644.  
  645.      The cd command changes the working directory on the remote host. Use
  646.      this command to move to different areas on the remote server. If you
  647.      just opened a new site, you might be in the root directory. Perhaps
  648.      there was a directory called ``/pub/news/comp.sources.d'' that someone
  649.      told you about. From the root directory, you could:
  650.  
  651.           cd pub
  652.           cd news
  653.           cd comp.sources.d
  654.  
  655.      or, more concisely,
  656.  
  657.           cd /pub/news/comp.sources.d
  658.  
  659.      Then, commands such as get, put, and ls could be used to refer to
  660.      items in that directory.
  661.  
  662.   close   Closes the connection to the remote host
  663.  
  664.      The close command will disconnect from the remote host.   If this is
  665.      the first time you have connected to this host, a new entry for this
  666.      host will be placed in your bookmarks file.
  667.  
  668.   colors       Enters the Color Configuration Screen
  669.  
  670.      The colors command takes you into the color configuration screen.
  671.      Here you can select your favorite foreground and background colors for
  672.      NcFTP.
  673.  
  674.   create  Creates an empty file on the remote host
  675.  
  676.      Sometimes it may be necessary to use the create command. This makes an
  677.      empty file on the remote host. This can be useful when you are unable
  678.      to contact the remote server's administrator, but hope someone in the
  679.      know will spot your file. For example,
  680.  
  681.           create readline2.0.tar_is_corrupt
  682.  
  683.      might persuade someone to repost that file.
  684.   debug   Sets debug mode to level or displays debug state
  685.  
  686.      The debug command is mostly for use by me and the testers. You could
  687.      type
  688.  
  689.           debug 1
  690.  
  691.      to turn debugging mode on. Then you could see all messages between the
  692.      program and the remote server, and things I print only in debugging
  693.      mode. If you report a bug, I might ask you to send me a trace file. To
  694.      do that, you would run the program, and then type
  695.  
  696.           debug trace 1
  697.  
  698.      debug without any arguments displays the current debug level.  Valid
  699.      debug levels are 1 thur 5.
  700.  
  701.   delete  Deletes files from the remote host
  702.  
  703.      If you need to delete a remote file you can try the delete command.
  704.      Much of the time this won't work because you won't have the proper
  705.      access permissions.
  706.  
  707.      This command is obsolete, you should use the rm command instead.
  708.  
  709.   dir          Prints a verbose directory listing
  710.  
  711.      The dir command prints a detailed directory listing. It tries to
  712.      behave like UNIX's ``/bin/ls -l'' command. If the remote server seems
  713.      to be a UNIX host, you can also use the same flags you would with ls,
  714.      for instance
  715.  
  716.           dir -rt
  717.  
  718.      would try to act like
  719.  
  720.           /bin/ls -lrt
  721.  
  722.      would on UNIX.
  723.  
  724.   echo    Echos back to screen, expanding special % and @ sequences
  725.  
  726.      The echo command wouldn't seem very useful, but it can be nice for use
  727.      with the program's macros. It behaves like the equivalent command does
  728.      under a UNIX shell, but accepts some extra flags. All ``percent''
  729.      flags are fed through strftime(4). So you could type
  730.  
  731.           echo It is now %H:%M on %B %d.
  732.  
  733.      and you should get something like this printed on your screen:
  734.  
  735.           It is now 19:00 on January 22.
  736.  
  737.      There are also ``at'' flags, which the program expands:
  738.           @H   : Name of connected host
  739.           @D   : Full pathname of remote current working directory
  740.           @J   : Short name of remote current working directory
  741.           @N   : Newline.
  742.           @n   : Bookmark name of connected host
  743.  
  744.      Example:
  745.  
  746.           echo "Connected to @H at %H:%M." >> junk
  747.  
  748.      If you later looked at the contents of ``junk,'' it might say:
  749.  
  750.           Connected to sphygmomanometer.unl.edu at 20:37.
  751.  
  752.  
  753.  
  754.   exit         quits NcFTP
  755.  
  756.      Closes all open connections and exits NcFTP.
  757.  
  758.   get          Retrieves files from the remote host
  759.  
  760.      The get command copies files from the current working directory on the
  761.      remote host to your machine's current working directory. To place a
  762.      copy of ``README'' in your local directory, you could try:
  763.  
  764.           get README
  765.  
  766.      The get command has some powerful features which are described below,
  767.      in ``SPECIAL DOWNLOADING FEATURES.''
  768.  
  769.      Syntax:
  770.  
  771.      get [-flags] file1 [file2...]
  772.  
  773.           Flags:
  774.               -C         : Force continuation (reget).
  775.               -f         : Force overwrite.
  776.               -G         : Don't use wildcard matching.
  777.               -R         : Recursive.  Useful for fetching whole
  778.      directories.
  779.               -n X  : Get selected files only if X days old or newer.
  780.               -z         : Get the remote file X, and name it to Y.
  781.             Examples:
  782.               get README
  783.               get README.*
  784.               get -G **Name.with.stars.in.it**
  785.               get -R new-files-directory
  786.               get -z WIN.INI ~/junk/windows-init-file",
  787.  
  788.   hosts   Edit the settings for each remote host
  789.  
  790.   lcd          Changes local working directory
  791.  
  792.      The lcd command is the first of a few ``l'' commands that work with
  793.      the local host. This changes the current working directory on the     local host. If you want to download files into a different local
  794.      directory, you could use lcd to change to that directory and then do
  795.      your downloads.
  796.  
  797.      Issuing an lcd with no parameters will change the local directory to
  798.      the directory specified by the HOME environment variable.
  799.  
  800.   less         Views a file from the remote host one page at a time.
  801.  
  802.   lls          Prints a local directory listing
  803.  
  804.      Another local command that comes in handy is the lls command, which
  805.      runs ``/bin/ls'' on the local host and displays the results in the
  806.      program's window. You can use the same flags with lls as you would in
  807.      your command shell, so you can do things like:
  808.  
  809.           lcd ~/doc
  810.           lls -lrt p*.txt
  811.  
  812.   lookup  Looks up information in the host database
  813.  
  814.      The program also has a built-in interface to the name service via the
  815.      lookup command. This means you can lookup entries for remote hosts,
  816.      like:
  817.  
  818.           lookup cse.unl.edu ftp.cs.unl.edu sphygmomanometer.unl.edu
  819.  
  820.      prints:
  821.  
  822.           cse.unl.edu 129.93.33.1
  823.           typhoon.unl.edu 129.93.33.24
  824.           sphygmomanometer.unl.edu 129.93.33.126
  825.  
  826.      There is also a more detailed option, enabled with ``-v,'' i.e.:
  827.  
  828.           lookup -v cse.unl.edu ftp.cs.unl.edu
  829.  
  830.      prints:
  831.  
  832.           cse.unl.edu:
  833.                Name: cse.unl.edu
  834.                Address: 129.93.33.1
  835.  
  836.           ftp.cs.unl.edu:
  837.                Name: typhoon.unl.edu
  838.                Alias: ftp.cs.unl.edu
  839.                Address: 129.93.33.24
  840.  
  841.      You can also give IP addresses, so this would work too:
  842.  
  843.           lookup 129.93.33.24
  844.  
  845.      prints:
  846.  
  847.           typhoon.unl.edu 129.93.33.24
  848.   lpage   Views a local file with your pager (-p) or built-in pager (-b)
  849.  
  850.      The lpage command views a local file one page at a time. By default,
  851.      the program uses your pager program to view the files. You can choose
  852.      to use the built-in pager by using the ``-b'' flag. Example:
  853.  
  854.           lpage -b ~/.ncftp/bookmarks
  855.  
  856.   lpwd    Prints the current local working directory
  857.  
  858.      The lpwd command is prints the current local directory. Use this
  859.      command when you forget where you are on your local machine.
  860.  
  861.   ls           Prints a remote directory listing
  862.  
  863.      The ls command prints a brief directory listing. It tries to behave
  864.      like UNIX's ``/bin/ls -CF'' command. If the remote server seems to be
  865.      a UNIX host, you can also use the same flags you would with ls, for
  866.      instance
  867.  
  868.           ls -rt
  869.  
  870.      would try to act like
  871.  
  872.           /bin/ls -CFrt
  873.  
  874.      would on UNIX.
  875.  
  876.   mget    Retrieves files from the remote host
  877.  
  878.      This command is obsolete with NcFTP 2.3.0.  Refer to the get command.
  879.  
  880.   mkdir   Creates directories on the remote host
  881.  
  882.       The mkdir command tries to create a new directory on the remote host.
  883.      For many public archives, you won't have the proper access permissions
  884.      to do that.
  885.  
  886.   more    Views a file from the remote host one page at a time
  887.  
  888.   mput    Sends files to the remote host
  889.  
  890.      The mput command is there in case you need to upload multiple files to
  891.      remote hosts. For example, if I wanted to send some files to a remote
  892.      host, I could do:
  893.  
  894.           lcd ~/docs/files
  895.           mput 02.txt 03.txt 05.txt 07.txt 11.txt
  896.  
  897.      The mput command won't work if you don't have the proper access
  898.      permissions on the remote host. Also, this command doesn't have any of     the special features that the get command has, except for the ``-z''
  899.      option.
  900.  
  901.      This command is obsolete in NcFTP 2.3.0, please refer to the put
  902.      command.
  903.  
  904.   open    Connects to a remote host
  905.  
  906.      The open command connects you to a remote host. Many times, you will
  907.      simply open a host without using any flags, but nonetheless the open
  908.      command has some flags to enable certain features.
  909.  
  910.      To force an anonymous open, use the ``-a'' flag.  On the ftp.probe.net
  911.      machine, which is the official archive site for NcFTP, I have a need
  912.      to use both anonymous logins and user logins. The Bookmark Editor
  913.      remembers type of login I used last, so if the last time was a user
  914.      login, I could use the ``-a'' flag to switch back to the anonymous
  915.      login type without having to use the Bookmark Editor to change that.
  916.  
  917.      Likewise, I could use the ``-u'' flag to force a user open. Then I
  918.      could give my account name and password to access that account.
  919.  
  920.      Many of the big archive sites like wuarchive.wustl.edu are busy, so
  921.      you aren't guaranteed a connection to them. The program lets you
  922.      ``redial'' sites periodically, until a connection succeeds. Use the
  923.      ``-r' flag to turn on automatic redial.
  924.  
  925.      Redial itself has a few parameters. You can set the delay, in seconds,
  926.      of the time spent waiting between redials. You can also have the
  927.      program give up after a maximum number of redials is reached. Here's
  928.      an example that fully utilizes redial mode:
  929.  
  930.           open -r -d 75 -g 10 bowser.nintendo.co.jp
  931.  
  932.      The ``-r'' turns on redialing, the ``-d'' sets the redial delay to 75
  933.      seconds, and the ``-g'' flag limits redialing to 10 tries. If you
  934.      like, you can just trust the default redial settings and only use ``-
  935.      r.''
  936.  
  937.      The open command will run the Bookmark Editor if you don't supply a
  938.      hostname to open. You can use the Bookmark Editor to select a host and
  939.      open it by hitting the return key.
  940.  
  941.      Syntax:
  942.  
  943.           Flags:
  944.               -a         : Open anonymously.
  945.               -u         : Open with username and password prompt.
  946.               -p X  : Use port number X when opening.
  947.               -r         : Redial until connected.
  948.               -d X  : Redial, delaying X seconds between tries.
  949.               -g X  : Give up after X redials without connection.
  950.  
  951.             Examples:
  952.               open sphygmomanometer.unl.edu
  953.               open -u bowser.nintendo.co.jp              open -r -d 75 -g 10 sphygmomanometer.unl.edu
  954.  
  955.   page    Views a file from the remote host one page at a time
  956.  
  957.      The page command lets you browse a remote file one page at a time.
  958.      This is useful for reading README's on the remote host without
  959.      downloading them first. This command uses whatever program you have
  960.      set the pager field in the Preferences screen to view the file.
  961.  
  962.   pdir    Views a directory listing through your pager
  963.  
  964.      The pdir and pls commands are equivalent to dir and ls respectively,
  965.      only they feed their output to your pager. These commands are
  966.      primarily for line mode because directory listings can scroll
  967.      offscreen. If you do a normal ls while in visual mode, if it would go
  968.      offscreen, the built-in pager kicks in automatically.  Therefore I
  969.      don't recommend using pdir and pls while in visual mode.
  970.  
  971.   pls          Views a directory listing through your pager
  972.  
  973.      The pdir and pls commands are equivalent to dir and ls respectively,
  974.      only they feed their output to your pager. These commands are
  975.      primarily for line mode because directory listings can scroll
  976.      offscreen. If you do a normal ls while in visual mode, if it would go
  977.      offscreen, the built-in pager kicks in automatically.  Therefore I
  978.      don't recommend using pdir and pls while in visual mode.
  979.  
  980.   predir       Re-displays the last directory listing through your pager
  981.  
  982.      The redir and predir commands give you a way to re-display the last
  983.      directory listing. The program saves the output from the last dir or
  984.      ls command you did, so if you want to see it again you can do this
  985.      without wasting network bandwidth. The predir command is the same as
  986.      redir, except that the output is fed to your pager.
  987.  
  988.   prefs        Lets you configure the program's settings (Visual mode only)
  989.  
  990.   put          Sends a file to the remote host
  991.  
  992.      I have found that I mostly download, and have next to no need at all
  993.      to upload. But the put command is there in case you need to upload
  994.      files to remote hosts. For example, if I wanted to send some files to
  995.      a remote host, I could do:
  996.  
  997.           lcd ~/docs/files
  998.           put 02.txt 03.txt 05.txt 07.txt 11.txt
  999.  
  1000.      The put command won't work if you don't have the proper access
  1001.      permissions on the remote host. Also, this command doesn't have any of
  1002.      the special features that the get command has, except for the ``-z''
  1003.      option.
  1004.  
  1005.      Syntax
  1006.  
  1007.      put [-flags] file1 [file2...] sends a file to the remote host           Flags:
  1008.              -z     : Send the local file X, and name the remote copy to Y.
  1009.            Examples:
  1010.              put README
  1011.              put -z ~/junk/windows-init-file WIN.INI
  1012.  
  1013.   pwd     Prints the current remote working directory
  1014.  
  1015.      The pwd command prints the current remote working directory.  In
  1016.      visual mode, this is in the status bar.
  1017.  
  1018.   redir   Re-displays the last directory listing
  1019.  
  1020.      The redir and predir commands give you a way to re-display the last
  1021.      directory listing. The program saves the output from the last dir or
  1022.      ls command you did, so if you want to see it again you can do this
  1023.      without wasting network bandwidth. The predir command is the same as
  1024.      redir, except that the output is fed to your pager.
  1025.  
  1026.   rename  Changes the name of a file on the remote host
  1027.  
  1028.      If you need to change the name of a remote file, you can use the
  1029.      rename command, like:
  1030.  
  1031.           rename SPHYGMTR.TAR sphygmomanometer-2.3.1.tar
  1032.  
  1033.   rglob   Tests remote filename wildcard matching
  1034.  
  1035.   q       Quits NcFTP
  1036.  
  1037.   quit    Quits NcFTP
  1038.  
  1039.      Of course, when you finish using the program, type quit to end the
  1040.      program (You could also use bye, exit,  or ^D).
  1041.  
  1042.   quote   Sends an FTP command to the remote server
  1043.  
  1044.      The quote command can be used to send a direct FTP Protocol command to
  1045.      the remote server. Generally this isn't too useful to the average user
  1046.      (or me either).
  1047.  
  1048.   rhelp   Requests help from the remote server
  1049.  
  1050.      The rhelp command sends a help request to the remote server. The list
  1051.      of FTP Protocol commands is often printed, and sometimes some other
  1052.      information that is actually useful, like how to reach the site
  1053.      administrator.
  1054.  
  1055.      Depending on the remote server, you may be able to give a parameter to
  1056.      the server also, like:
  1057.  
  1058.           rhelp NLST
  1059.  
  1060.      One server responded:
  1061.  
  1062.           Syntax: NLST [ <sp> path-name ]
  1063.   rm           Deletes files from the remote host
  1064.  
  1065.      If you need to delete a remote file you can try the rm command. Much
  1066.      of the time this won't work because you won't have the proper access
  1067.      permissions. This command doesn't accept any flags, so you can't nuke
  1068.      a whole tree by using ``-rf'' flags like you can on UNIX.
  1069.  
  1070.   rmdir   Deletes directories from the remote host
  1071.  
  1072.      Similarly, the rmdir command removes a directory. Depending on the
  1073.      remote server, you may be able to remove a non-empty directory, so be
  1074.      careful.
  1075.  
  1076.   set          Lets you configure a program setting from the command line
  1077.  
  1078.      The set command is provided for backward compatibility with older
  1079.      versions of the program, and is superseded by the prefs command. The
  1080.      basic syntax is:
  1081.  
  1082.           set option value
  1083.  
  1084.      Where the option is the short name of the corresponding field in the
  1085.      Preferences screen. The short names of the preferences fields can be
  1086.      found by browsing your ~/.ncftp/prefs file. This command is mainly for
  1087.      use with line mode, but since that mode is no longer officially
  1088.      supported by me, I want to discourage the use of this command.
  1089.  
  1090.      The list of valid set options are:
  1091.  
  1092.           anonopen  Default open mode:
  1093.           anonpass  Anonymous password:
  1094.           blank-lines    Blank lines between cmds:
  1095.           ftp-mode  Default FTP mode:
  1096.           logsize        User log size:
  1097.           maxbookmarks   Max bookmarks to save:
  1098.           pager          Pager:
  1099.           progress-meter Progress meter:
  1100.           remote-msgs    Remote messages:
  1101.           startup-lcwd   Startup in Local Dir:
  1102.           startup-msgs   Startup messages:
  1103.           timeout        Network timeout:
  1104.           trace          Trace logging:
  1105.           utime          File timestamps:
  1106.           visual         Screen graphics:
  1107.           redialattempts Redial Attempts:
  1108.           redialpause    Pause Between Redials:
  1109.           pagenewwin     Pager in Separate Window:
  1110.  
  1111.   site         Sends a host-specific FTP command to the remote server
  1112.  
  1113.      One obscure command you may have to use someday is site. The FTP
  1114.      Protocol allows for ``site specific'' commands. These ``site''
  1115.      commands vary of course, but one common sub-command that is useful
  1116.      that some sites support is chmod, i.e.:
  1117.           site chmod 644 README
  1118.  
  1119.      Try doing one of these to see what the remote server supports, if any:
  1120.  
  1121.           rhelp SITE
  1122.           site help
  1123.  
  1124.   type    Sets file transfer type (one of 'ascii' or 'binary')
  1125.  
  1126.      You may need to change transfer types during the course of a session
  1127.      with a server. You can use the type  command to do this. Try one of
  1128.      these:
  1129.  
  1130.           type ascii
  1131.           type binary
  1132.           type image
  1133.  
  1134.  
  1135.   verbose      Sets verbosity mode to 0, 1, 2, or 3
  1136.  
  1137.   version      Prints version information
  1138.  
  1139.      If you ever need to contact me about the program, please familiarize
  1140.      yourself with the version command. This command dumps a lot of
  1141.      information that tells me which edition of the program you are using,
  1142.      and how it was installed on your system. Here's a way to save the
  1143.      output of this command to a file, so you can send it to me:
  1144.  
  1145.           version > version.txt
  1146. SPECIAL DOWNLOADING FEATURES
  1147.  
  1148.      You probably already know that you use the get command to copy files
  1149.      on the remote host to the local host. But the get command has a few
  1150.      other tricks that you might find useful. First of all, ncftp skips
  1151.      files you already have. If you try to
  1152.  
  1153.           get file24
  1154.  
  1155.      and there is a file named ``file24'' in the current local directory
  1156.      already, the program uses some additional heuristics to determine if
  1157.      it should actually waste network bandwidth to download it again.
  1158.  
  1159.      The program tries to get the date and size of the remote file
  1160.      ``file24.''  If that file has the exact same date and size as the
  1161.      local file ``file24,'' the program will skip over that file. If the
  1162.      program could not get the date or size of the remote file, or the size
  1163.      differs, the program will go ahead and fetch the file.
  1164.  
  1165.      In addition, if the local file's date is newer than the remote file's
  1166.      date, the program skips the download because it concludes you already
  1167.      have a more recent version.
  1168.  
  1169.      What all this means for you is that you can use the program to mirror
  1170.      another archive. For example, you might have a task that requires you
  1171.      keep a mirror of all the files of a remote directory called ``files.''
  1172.      In that directory, there might be dozens of files, some of which are
  1173.      updated occasionally. You could use ncftp to  help you out by setting
  1174.      the appropriate local and remote directories, then simply doing:
  1175.  
  1176.           get *
  1177.  
  1178.      The program will skip over the old files, and only download the files
  1179.      that you don't have or have been updated since the last time.
  1180.  
  1181.      Nonetheless, you may want to ignore the program's advice and download
  1182.      a file anyway, despite the program's thinking that you don't need to.
  1183.      You can use the ``-f'' flag with get to force a download:
  1184.  
  1185.           get -f README
  1186.  
  1187.      You may also need to use the ``-C'' flag to force the program to
  1188.      continue downloading where it left off. I sometimes call that feature
  1189.      ``forced reget'' for historical reasons.
  1190.  
  1191.      You can also turn off wildcard matching with get by using the ``-G''
  1192.      flag. Other FTP programs used the syntax
  1193.  
  1194.           get remote-file [local-file]
  1195.  
  1196.      which allowed you to specify a local pathname for the file you were
  1197.      trying to download. NcFTP differs in that respect, and if you used the
  1198.      older programs, you would find that the program's get behaves more
  1199.      like those other program's mget command. This means that in NcFTP,that
  1200.  
  1201.           get file01 file02
  1202.      tries to download remote files named ``file01'' and ``file02.'' If you
  1203.      like, you can get that older behavior by using the ``-z'' flag, so:
  1204.  
  1205.           get -z file01 ../junk/files/01.txt
  1206.  
  1207.      would get ``file01'' and use the local name ``../junk/files/01.txt.''
  1208.  
  1209.      Another thing that get does is that you can use the ``-n'' flag to
  1210.      fetch files that are a certain number of days old or newer. If you
  1211.      just want to get the newest files at an archive, you don't have to use
  1212.      a full mirror. You can just say ``download all files that are 3 days
  1213.      old or newer.'' Do that by going to a directory, and trying:
  1214.  
  1215.           get -n 3 *
  1216.  
  1217.      The program also has ``reget'' mode built into the get command. Other
  1218.      FTP programs provided a reget command, which was useful when you lost
  1219.      a connection during a download. Instead of the remote host resending
  1220.      the entire file, you could use the reget command to continue the
  1221.      transfer where it was cut off.
  1222.  
  1223.      NcFTP has this capability built-in, and it examines the date and size
  1224.      of the remote file and local file to determine if the program should
  1225.      continue where it left off last time. If the dates are the same, but
  1226.      the local file is smaller, the program attempts to ``reget.''
  1227.  
  1228.      The last, and most wasteful feature of get is recursive mode, which is
  1229.      turned on with the ``-R'' flag. This feature lets you download an
  1230.      entire directory's contents, i.e.:
  1231.  
  1232.           get -R /pub/info/help
  1233.  
  1234.      That creates a directory called ``./help'' in the current local
  1235.      directory, and copies all files and subdirectories into it.
  1236.  
  1237.      Please use some discretion with this feature. If you get a large
  1238.      directory, you could really bog down the remote host. Archive
  1239.      administrators are providing a public service, so don't abuse the
  1240.      archive so much that they have to shut down public access because the
  1241.      real users of that archive can't get their work done.
  1242. MACROS
  1243.  
  1244.      The program has a simple macro/alias facility. You can use macros to
  1245.      roll your own commands, or do things when certain events happen.
  1246.  
  1247.      To use macros, you will need to create and edit the macros file in
  1248.      your .ncftp subdirectory of your home directory. Your ~/.ncftp
  1249.      directory is created for you automatically the first time you run the
  1250.      program, but you have to make the macros file yourself since most
  1251.      users won't have a need for them.
  1252.  
  1253.      You can have any number of macros. The syntax is:
  1254.  
  1255.           macro macro-name
  1256.                macro-body...
  1257.           end
  1258.  
  1259.      Here's a simple macro that users of the old ftp program might
  1260.      appreciate:
  1261.  
  1262.           macro binary
  1263.                type i
  1264.           end
  1265.  
  1266.      You could run that macro simply by running the program and typing the
  1267.      macro name as if it were a regular ncftp command.
  1268.  
  1269.      Macros can also have parameters, much like the Korn Shell's shell
  1270.      functions and the C-Shell's aliases. These parameters are sent to your
  1271.      macro, and if your macro uses the appropriate ``dollar'' variables,
  1272.      they
  1273.       are expanded. To illustrate, try this macro:
  1274.  
  1275.           macro cdls
  1276.                cd $1
  1277.                ls
  1278.           end
  1279.  
  1280.      To run that macro, open a connection and try:
  1281.  
  1282.           cdls /pub
  1283.  
  1284.      That would try to cd to /pub, and then try to list its contents with
  1285.      ls.
  1286.  
  1287.      Dollar variables are somewhat like those in the Bourne and Korn
  1288.      shells.  Example syntax:
  1289.  
  1290.           $4   : Argument 4
  1291.           $*   : All arguments.
  1292.           $@   : All arguments, each of them surrounded by double quotes.
  1293.           $(2-5)    : Arguments 2, 3, 4, and 5.
  1294.           $(2,5)    : Arguments 2 and 5.
  1295.           $(3+)     : Arguments 3, 4, 5, ..., N.
  1296.      A better way to code the ``cdls'' macro might be:
  1297.  
  1298.           macro cdls
  1299.                cd $1
  1300.                ls $(2+)
  1301.           end
  1302.  
  1303.      There are some special macros, which I call event macros. The program
  1304.      looks for macros by special names, and if they exist, runs the macro
  1305.      when that event happens.
  1306.  
  1307.      One event macro is the .start.ncftp macro. If you have a macro by that
  1308.      name defined in your macros file, the program will run that macro each
  1309.      time you run the program.
  1310.  
  1311.      Similarly, there is also a .quit.ncftp macro that is run each time you
  1312.      quit the program.
  1313.  
  1314.      Another set of event macros are site-specific. For example, if I have
  1315.      a site bookmarked as ``typhoon'' I could then define macros named
  1316.      .open.typhoon and .close.typhoon which would run each time I opened
  1317.      and closed ``typhoon.''
  1318.  
  1319.      Another, more generic set of event macros are the .open.any and
  1320.      .close.any macros which run when I open or close any site. One
  1321.      possible use for these macros is to run separate shell scripts to do
  1322.      some processing after you finish using a site. I could have a macro
  1323.      like this:
  1324.  
  1325.           macro .quit.ncftp
  1326.                echo "Started post-processing downloads at %H:%M:%S"
  1327.                !sh ~/scripts/download-decoder
  1328.                echo "Finished post-processing downloads at %H:%M:%S"
  1329.           end
  1330.  
  1331.      Another use is to duplicate the old macdef init hack that the
  1332.      traditional ftp program used in its .netrc file.  For example:
  1333.  
  1334.           macro .open.infomac
  1335.                echo "Getting recent files list"
  1336.                get -z /pub/info-mac/help/recent-files ~/docs/recent
  1337.                ls -lrt
  1338.           end
  1339.  
  1340. USING COLON MODE
  1341.  
  1342.      The colon-mode feature is used from your shell's command line.
  1343.  
  1344.      In ancient times, way back during the Disco Era, you could use a
  1345.      program called tftp to fetch a file using the Internet standard
  1346.      Trivial File Transfer Protocol. You could use that program to do
  1347.      something like this  from within its shell:
  1348.           get wuarchive.wustl.edu:/graphics/gif/README
  1349.  
  1350.      and that would call wuarchive and fetch the README file.
  1351.  
  1352.      You can use this program to do the same thing from your shell's
  1353.      command line:
  1354.  
  1355.           csh> ncftp wuarchive.wustl.edu:/graphics/gif/README
  1356.           csh> head README
  1357.  
  1358.      This tells your shell, in this case the C-shell to run NcFTP, which
  1359.      would open wuarchive, fetch /graphics/gif/README and write the file
  1360.      /README in the current working directory, and then exits.
  1361.  
  1362.      The colon-mode feature is nice if you don't want to browse around the
  1363.      remote site, and you know exactly want you want. It also comes in
  1364.      handy in shell scripts, where you don't want to enter the command
  1365.      shell, and might not want the program to spew output.
  1366.  
  1367.      You can use the Uniform Resource Locator standard also. For example,
  1368.      this would work:
  1369.  
  1370.           csh> ncftp ftp://wuarchive.wustl.edu/graphics/gif/README
  1371.  
  1372.      There are times where you might not want the program to write a colon-
  1373.      mode file in the current working directory, or perhaps you want to
  1374.      pipe the output of a remote file into something else. Colon-mode has
  1375.      options to do this. It was inspired by the guy who wrote the ftpcat
  1376.      perl script.  The ``-c'' option tells the program to write on the
  1377.      standard output stream. The ``-m'' option pipes the file into your
  1378.      pager (like more). Of course this won't work if the thing you give
  1379.      colon-mode is a directory! This example just dumps a remote file to
  1380.      stdout:
  1381.  
  1382.           csh> ncftp -c wuarc:/graphics/gif/README
  1383.  
  1384.      This example redirects a remote file into a different location:
  1385.  
  1386.           csh> ncftp -c wu:/README > ~pdietz/thesis.tex
  1387.  
  1388.      This one shows how to use a pipeline:
  1389.  
  1390.           csh> ncftp -c wuarc:/README | tail | wc -l
  1391.           10
  1392.           csh>
  1393.  
  1394.      This shows how to page a remote file:
  1395.  
  1396.           csh> ncftp -m wuarc:/graphics/gif/README
  1397.  
  1398. USING LINE MODE
  1399.  
  1400.      The only reason I provide line mode is so that the primitive operating
  1401.      systems whose curses library is missing or dysfunctional won't render
  1402.      the program completely useless.
  1403.      exceptions of the functions that require visual mode, such as the
  1404.      Preferences screen and the Bookmark  Editor. You will have to edit the
  1405.      ~/.ncftp/prefs and ~/.ncftp/bookmarks file manually, with a text
  1406.      editor.
  1407.  
  1408.      As a small consolation, you get to use the full-powered line-editing
  1409.      libraries, like GNU Readline if they were compiled with the program.
  1410. SUMMARY OF COMMAND LINE OPTIONS
  1411.  
  1412.      When you invoke the program from your shell, there are ``dash flags''
  1413.      you can use like you can with most other UNIX programs.
  1414.  
  1415.      Here's a list of options you can use from the command line:
  1416.  
  1417.           -D   : Turns on debugging mode and tracing.
  1418.           -V   : Uses ``visual'' mode for this session.
  1419.           -L   : Uses ``line mode'' for this session.
  1420.           -H   :  Prints the information from the ``version'' command and
  1421.      exits.
  1422.  
  1423.      When you turn on tracing, the program writes a log with debugging
  1424.      information to a file called trace in your .ncftp subdirectory of your
  1425.      home directory. If you need to report a bug, it would be helpful to
  1426.      mail me the trace file so I can track it down better.
  1427.  
  1428.      In addition to the program flags, you can also use flags from the open
  1429.      and get commands with a colon mode path. Here's a really complex
  1430.      example:
  1431.  
  1432.           csh> ncftp -r -d 120 -n 3 sphygmomanometer.unl.edu:/pub/stuff/*
  1433.  
  1434.      This tries redialing that host every two minutes, and fetching all
  1435.      files from the ``/pub/stuff'' directory that are 3 days old or newer.
  1436. AUTHOR
  1437.  
  1438.      NcFTP was written by Mike Gleason,  NCEMRSoft (mgleason@probe.net).
  1439.      NcFTP is copyrighted 1995 by NCEMRSoft. All rights reserved.
  1440.  
  1441.      As of this writing, the most recent version is archived in /pub/ncftp,
  1442.      on ftp.probe.net.
  1443.  
  1444.      The OS/2 Port of NcFTP v2.3.0 was done by Mark R. Evans 
  1445.      (mevans@ecsnet.com).
  1446.  
  1447. THANKS
  1448.  
  1449.      Ideas and some code contributed by my partner, Phil Dietz, NCEMRSoft
  1450.      (dietz@wtc.com).
  1451.  
  1452.      Thanks to everyone who has helped test the program, and sent in
  1453.      feedback over the years. Your support is what drives me to improve the
  1454.      program!
  1455.  
  1456.      I'd like to thank my former system administrators, most notably
  1457.      Charles Daniel, for making testing on a variety of platforms possible,
  1458.      letting me have some extra disk space, and for maintaining the UNL FTP
  1459.      site.
  1460.  
  1461.      I also thank Dale Botkin and Tim Russell at Probe Technology, for
  1462.      giving ncftp a home on probe.net, the midwest's best connection to the
  1463.      internet.
  1464.  
  1465.      For testing above and beyond the call of duty, I am especially
  1466.      grateful to: Phil Dietz, Kok Hon Yin (hkok@cse.unl.edu), Andrey A.
  1467.      Chernov (ache@astral.msk.su).
  1468.  
  1469.      Thanks to Tim MacKenzie (t.mackenzie@trl.oz.au) for the filename
  1470.      completion code.
  1471.  
  1472.      Thanks to DaviD W. Sanderson (dws@ssec.wisc.edu), for helping me out
  1473.      with the man page.
  1474.  
  1475. THANKS From Mark Evans
  1476.  
  1477.      I would like to thank Eberhard Mattes for his emx development
  1478.      environment.  Without his efforts, this port would not be possible.
  1479.  
  1480.      Also, I would like to thank Steve Willer for his original port of
  1481.      NcFTP v1.9.3.  He did an excellent job and came up with some inovative
  1482.      ideas which I have included with this port.
  1483.  
  1484.      Last but not least, the group that helped me beta test this port and
  1485.      put up with my programming errors and almost daily betas:
  1486.  
  1487.           macwarp@ix.netcom.com    John McNamara
  1488.           bob@bridge.net           Bob Lyons
  1489.           oscar@primenet.com       Oscar Fowler
  1490.           gunter@htlsun1.fzk.de    Gunter Spranz
  1491.           acowan@uoguelph.ca       Andrew Cowan          rob@iconz.co.nz          Rob
  1492.           beaufour@mailhost.net    Allan Beaufour Larsen
  1493.           phydoux@utw.com          Michael Monsen
  1494.           satori@ibm.com           Patrick McKane
  1495.           morpheaus@kuwait.net          Ahmad Al-Nusif
  1496.  
  1497. BUGS
  1498.  
  1499.      Due to a limitation in the curses library, scrolling may be slow in
  1500.      visual mode.
  1501.  
  1502.      Shell escapes, suspending (^Z) and resuming, and interruping (^C)
  1503.      still have quirks with visual mode.
  1504.  
  1505.      There are no such sites named bowser.nintendo.co.jp or
  1506.      sphygmomanometer.unl.edu.
  1507.  
  1508. BUG in the OS/2 Port
  1509.  
  1510.      During a transfer, Ctrl-C will abort the transfer.  Subsequent Ctrl-
  1511.      C's from a transfer will close the connection with the host.
  1512.  
  1513.     ALL BUG REPORTS FOR THE OS/2 PORT OF NcFTP v2.3.0 SHOULD BE SENT TO
  1514.     mevans@ecsnet.com
  1515.  
  1516.